package com.hxl.dao.impl;

import com.hxl.dao.BookDao;
import com.hxl.pojo.Person;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Properties;
@Data
public class BookDaoImpl implements BookDao {

    private ArrayList<String> al = new ArrayList<>();
    private ArrayList<Person> a2 = new ArrayList<>();
    private Properties properties = new Properties();
    private String[] arr = new String[2];
    private HashSet<String> hs = new HashSet<>();
    private HashMap<Object,String> hm = new HashMap();

    public void setAl(ArrayList al) {
        this.al = al;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setArr(String[] arr) {
        this.arr = arr;
    }

    public void setHs(HashSet hs) {
        this.hs = hs;
    }

    public void setHm(HashMap hm) {
        this.hm = hm;
    }

    @Override
    public void save() {
        System.out.println("book dao running...");
        System.out.println("ArrayList:"+al);
        System.out.println("Properties:"+properties);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
        System.out.println("HashSet:"+hs);
        System.out.println("HashMap:"+hm);
        System.out.println("person"+a2);
    }
}
